package org.lex.splitter.ui.awt.actions;

import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import org.apache.log4j.Logger;
import org.lex.splitter.ui.awt.AwtSplit;
import org.lex.splitter.ui.awt.MessageDialog;
import org.lex.splitter.ui.awt.SplitContentPane;

public abstract class BaseActionListener implements ActionListener {
	protected Logger log = Logger.getLogger(getClass());

	public AwtSplit getApplication() {
		return AwtSplit.getApplication();
	}

	public Frame getMainFrame() {
		return AwtSplit.getApplication().getMainFrame();
	}

	public SplitContentPane getContentPane() {
		return AwtSplit.getApplication().getContentPane();
	}

	public void showMessageDialog(String title, String prompt, String message) {
		MessageDialog.showMessage(this.getMainFrame(), title, prompt, message);
	}

	public void actionPerformed(ActionEvent e) {
		log.warn(getClass() + " not implement yet");
		showMessageDialog("INFO", "Not implement yet", "");
	}
}
